package com.zhanghao.sdk.ui;

import com.zhanghao.sdk.callback.IRunCallback;
import com.zhanghao.sdk.SDKManager;
import com.zhanghao.sdk.constant.ENUM_DIALOG;
import com.zhanghao.sdk.model.TimeLong;
import com.zhanghao.sdk.util.FunctionUtils;

public class UiManager implements IUiManager {
    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }


    private TimeLong mShowLoginActionTime = new TimeLong(0);
    @Override
    public void showLoginView() {
        FunctionUtils.throttleExecute(mShowLoginActionTime, new IRunCallback() {
            @Override
            public void execute() {
                new UiFactory().getDialog(SDKManager.getInstance().getMainContext(), ENUM_DIALOG.LOGIN).show();
            }
        });
    }

    @Override
    public void showDialogTipsView() {

    }

    @Override
    public void showTopTipsView() {

    }

    @Override
    public void hideAll(boolean hideFloatIcon) {

    }

    @Override
    public void showFloatIcon() {

    }

    @Override
    public void hideFloatIcon() {

    }

    private static UiManager instance;

    public static UiManager getInstance() {
        if (instance == null) {
            instance = new UiManager();
        }
        return instance;
    }
}
